<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>

<!-- ========================= -->
<!-- root element: commercialInvoice -->
<!-- ========================= -->


<xsl:template match="commercialInvoice">

	<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <!-- ========================= -->
    <!-- gobal variables           -->
    <!-- ========================= -->

    <xsl:variable name="cancelImagePath" select="images//cancelImage"/>
    <xsl:variable name="logoPath" select="images//logo"/>

  	<fo:layout-master-set>
		<fo:simple-page-master master-name="A4-portrait"
        		page-height="11in"
        		page-width="8.5in"
        		margin-top="20mm"
        		margin-bottom="12mm"
      			margin-left="10mm"
      			margin-right="10mm">

             <fo:region-after extent="5mm"/>
			<!-- ========================================================  -->
			<!-- Inorder to check whether packing slip is cancelled or not -->
			<!-- ========================================================  -->

			<xsl:if test="@cancel='0'">
			<fo:region-body />
			</xsl:if>

			<xsl:if test="@cancel='1'">
			<fo:region-body background-image="{$cancelImagePath}" />
			</xsl:if>

  		</fo:simple-page-master>
	</fo:layout-master-set>


<fo:page-sequence master-reference="A4-portrait">

<!--============================== -->
<!-- Page Number block             -->
<!-- Modified By Basha (12/24/2003)-->
<!--============================== -->

<fo:static-content flow-name="xsl-region-after">
	<fo:block font-size="7pt" font-weight="bold" text-align="right">
        Page <fo:page-number />
	<!--
	<xsl:value-of select="count(/packingSlip/lineItems/lineItem)"/>
	-->
	 of
	<fo:page-number-citation ref-id="endofdoc"/>

	<!--
	<fo:page-number-citation ref-id="last-page"/>
	-->

        </fo:block>
</fo:static-content>


<fo:flow flow-name="xsl-region-body">

<!--==============================-->
<!-- Logo and Main Heading block  -->
<!--==============================-->

	<fo:block font-size="8pt" space-after="1cm">
	<fo:table table-layout="fixed" width="100%" >

	<!--<fo:table-column column-width="10mm"/>-->
	<fo:table-column column-width="35mm"/>
	<fo:table-column column-width="20mm" />
	<fo:table-column display-align="center" />
	<fo:table-column />

	<fo:table-body>

		<fo:table-row>

			<!--<fo:table-cell border="1pt double black"/>-->

			<fo:table-cell>
            <fo:external-graphic src="{$logoPath}" content-height = ".5in"  content-width = ".5in" />
	     	</fo:table-cell>

			<fo:table-cell />

            <fo:table-cell text-align="center">
                <fo:block font-size="12pt" font-weight="bold" display-align="center" text-decoration="underline">Commercial Invoice</fo:block>
            </fo:table-cell>

            <!--<fo:table-cell border="2"/>-->
            <fo:table-cell display-align="right">
                <fo:table table-layout="fixed" width="100%">
                    <fo:table-column />
                    <fo:table-column display-align="right" />
                        <fo:table-body>
                            <fo:table-row>
                                <fo:table-cell> </fo:table-cell>
                                <fo:table-cell text-align="left" >
                                    <xsl:apply-template match="selfAddress">
                                        <fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//name" /></fo:block>
                                        <fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//address1" /></fo:block>
                                        <fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//address2" /></fo:block>
                                        <fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//address3" /></fo:block>
                                        <fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//address4" /></fo:block>
                                        <!--<fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//city" /></fo:block>-->
                                        <fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//state" /></fo:block>
                                        <fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//phone" /></fo:block>
                                        <fo:block font-size="7pt" font-weight="bold"><xsl:value-of select="selfAddress//fax" /></fo:block>
                                    </xsl:apply-template>
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                </fo:table>
            </fo:table-cell>
		</fo:table-row>

	</fo:table-body>
	</fo:table >
	</fo:block>

<!--==============================-->
<!-- From and To addresses block  -->
<!--==============================-->


	<fo:table table-layout="fixed" width="100%" space-after="1cm">
		<fo:table-column column-width="50mm"/>
        <fo:table-column column-width="10mm"/>
		<fo:table-column column-width="50mm"/>
        <fo:table-column column-width="10mm"/>
		<fo:table-column column-width="50mm"/>

		<fo:table-body>
			<fo:table-row>
				<fo:table-cell>
			 		<fo:block font-size="8pt" > <xsl:apply-templates select="shipperAddress"/> </fo:block>
				</fo:table-cell>

			    <fo:table-cell>
			 		<fo:block font-size="8pt" ><!--space--> </fo:block>
				</fo:table-cell>

				<fo:table-cell>
			 		<fo:block font-size="8pt" > <xsl:apply-templates select="billToAddress"/> </fo:block>
				</fo:table-cell>

                <fo:table-cell>
			 		<fo:block font-size="8pt" > <!--space--> </fo:block>
				</fo:table-cell>

				<fo:table-cell>
			 		<fo:block font-size="8pt" > <xsl:apply-templates select="shipToAddress"/> </fo:block>
				</fo:table-cell>

			</fo:table-row>
		</fo:table-body>
	</fo:table>


<!--=================================-->
<!-- Sales Order & Information block -->
<!--=================================-->


	<fo:table width="100%" table-layout="fixed" space-after="0.5cm">
		<fo:table-column column-width="20mm" />
		<fo:table-column column-width="30mm" />
		<fo:table-column column-width="10mm" />
		<fo:table-column column-width="20mm" />
		<fo:table-column column-width="20mm" />

		<fo:table-body>

		<fo:table-row>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="/commercialInvoice/salesOrderFieldHeading"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="information//salesOrder"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="left">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					Packing Slip# :
		         	</fo:block>
		        </fo:table-cell>
			<fo:table-cell display-align="left">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="information//packingSlip"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
		</fo:table-row>
        <fo:table-row>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
                    <xsl:value-of select="/commercialInvoice/commercialInvoiceHeading"/>
                </fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
                     <xsl:value-of select="information//commercialInvoiceNo"/>
                </fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
		</fo:table-row>
        <fo:table-row>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					Ship Date:
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="information//shipDate"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					Pay Terms:
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="information//shippingTerms"/>
				</fo:block>
			</fo:table-cell>

		</fo:table-row>

        <fo:table-row>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					Way Bill :
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<xsl:for-each select="information//freightTracking">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="tracking"/>
				</fo:block>
				</xsl:for-each>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					Customer P.O. # :
	         		</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="information//customerPO"/>
		                </fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
		</fo:table-row>
		<fo:table-row>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					INCOTERMS :
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="information//incoterms"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>		
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					Country of Origin( Fab ):
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="information//countryOfFabOrigin"/>
				</fo:block>
			</fo:table-cell>					
		</fo:table-row>
        <fo:table-row>
			
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >					
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="center" font-size="7pt" font-weight="bold" >
				</fo:block>
			</fo:table-cell>			




			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					Country of Origin ( Assy ) :
				</fo:block>
			</fo:table-cell>
			<fo:table-cell display-align="center">
				<fo:block text-align="left" font-size="7pt" font-weight="bold" >
					<xsl:value-of select="information//countryOfAssyOrigin"/>
				</fo:block>
			</fo:table-cell>
		</fo:table-row>		
</fo:table-body>
</fo:table>


	<fo:table width="100%" table-layout="fixed" space-after="0.5cm">
		<fo:table-column column-width="100mm" />
		<fo:table-body>

			<fo:table-row>
				<fo:table-cell display-align="center">
					<fo:block text-align="left" font-size="7pt" font-weight="bold" >
						Comments:
	         			</fo:block>
				</fo:table-cell>
			</fo:table-row>
			<fo:table-row>
				<fo:table-cell display-align="center">
					<fo:block text-align="left" font-size="7pt" font-weight="bold" >
						<xsl:value-of select="information//comments"/>
		         		</fo:block>
				</fo:table-cell>
			</fo:table-row>
		</fo:table-body>
	</fo:table>


<!--=============================== -->
<!-- Line Items details block      -->
<!--=============================== -->

	<fo:block font-size="8pt" >
	        <xsl:apply-templates select="lineItems"/>
	</fo:block>

 <!--=============================== -->
<!-- Grand Total & Footer block      -->
<!--===============================  -->

    <fo:table margin="1cm" width="100%" table-layout="fixed" space-after="0.5mm">
        <fo:table-column  />
            <fo:table-body>
                   <fo:table-row height="0.5cm">
                    <fo:table-cell border="1pt double black" display-align="after" >
                       <fo:block text-align="center" font-size="6pt"  display-align="center" >
                        NOTE: THE VALUE SHOWN IS FOR CUSTOMS PURPOSE ONLY.
                   </fo:block>
                   </fo:table-cell>
                   </fo:table-row>
            </fo:table-body>
    </fo:table>
    <fo:table  width="100%" table-layout="fixed" space-after="0.5cm">
        <fo:table-column  />
            <fo:table-body>
                   <fo:table-row height="0.4cm">
                    <fo:table-cell background-color="#DEE1E2" display-align="center" >
                       <fo:block text-align="right" font-size="7pt" font-weight="bold"  >
                        Grand Total: <xsl:value-of select="extInformation//grandTotal"/>
                   </fo:block>
                   </fo:table-cell>
                   </fo:table-row>
            </fo:table-body>
    </fo:table>

    <fo:table width="100%" table-layout="fixed" space-after="0.5cm">
	       <fo:table-column column-width="20mm" />
           <fo:table-column column-width="10mm" />
           <fo:table-column column-width="50mm" />
           <fo:table-column column-width="10mm" />
           <fo:table-column column-width="20mm" />
           <fo:table-column column-width="10mm" />

	       <fo:table-body>

           <fo:table-row>
	       <fo:table-cell display-align="center">
		       <fo:block text-align="right" font-size="7pt" font-weight="bold" >
				TOTAL PKGS:
         	    </fo:block>
           </fo:table-cell>
           <fo:table-cell display-align="center">
		       <fo:block text-align="left" font-size="7pt" font-weight="bold" >
				   <!--<xsl:value-of select="extInformation//totalPKGS"/>-->
                   <xsl:if test="extInformation//totalPKGS!='0'">
                   <xsl:value-of select="extInformation//totalPKGS"/>
                   </xsl:if>
               </fo:block>
            </fo:table-cell>
            <fo:table-cell display-align="center">
                   <fo:block text-align="center" font-size="7pt" font-weight="bold" ></fo:block>
            </fo:table-cell>
            <fo:table-cell display-align="center">
                <fo:block text-align="center" font-size="7pt" font-weight="bold" ></fo:block>
            </fo:table-cell>
            <fo:table-cell display-align="center">
                <fo:block text-align="right" font-size="7pt" font-weight="bold" ></fo:block>
            </fo:table-cell>
            <fo:table-cell display-align="center">
			    <fo:block text-align="left" font-size="7pt" font-weight="bold" ></fo:block>
            </fo:table-cell>
            <fo:table-cell display-align="center">
                 <fo:block text-align="center" font-size="7pt" font-weight="bold" ></fo:block>
            </fo:table-cell>
            </fo:table-row>
	       <fo:table-row>
	       <fo:table-cell display-align="center">
		       <fo:block text-align="right" font-size="7pt" font-weight="bold" >
				<xsl:value-of select="extInformation//weightLabel"/>:
         	    </fo:block>
           </fo:table-cell>
           <fo:table-cell display-align="center">
		       <fo:block text-align="left" font-size="7pt" font-weight="bold" >
	               <xsl:value-of select="extInformation//totalWeight"/>
                   <xsl:if test="extInformation//totalWeight!=''">
                   <xsl:value-of select="extInformation//weightMeasurement"/>
                   </xsl:if>
               </fo:block>
            </fo:table-cell>
               <fo:table-cell display-align="center">
                   <fo:block text-align="center" font-size="7pt" font-weight="bold" >
                   </fo:block>
               </fo:table-cell>
            <fo:table-cell display-align="center">
                    <fo:block text-align="center" font-size="7pt" font-weight="bold" >
                     </fo:block>
            </fo:table-cell>
            <fo:table-cell display-align="center">
		    <fo:block text-align="right" font-size="7pt" font-weight="bold" >
		    </fo:block>
	    </fo:table-cell>
            <fo:table-cell display-align="center">
		       <fo:block text-align="left" font-size="7pt" font-weight="bold" >
                   
	               </fo:block>
            </fo:table-cell>
            <fo:table-cell display-align="center">
                 <fo:block text-align="center" font-size="7pt" font-weight="bold" >
                 </fo:block>
            </fo:table-cell>
            </fo:table-row>
         </fo:table-body>
       </fo:table>

    <fo:table margin="2mm" width="100%" table-layout="fixed" space-after="1cm" border="1pt double black"  >
        <fo:table-column  />
            <fo:table-body>
                   <fo:table-row  >
                    <fo:table-cell  display-align="center" >
                       <fo:block text-align="left" font-size="7pt"  display-align="center"  font-weight="bold">
                        These commodities, technology, or software were exported from the United States in accordance
                   </fo:block>
                   </fo:table-cell>
                   </fo:table-row>
                    <fo:table-row>
                    <fo:table-cell  display-align="center" >
                       <fo:block text-align="left" font-size="7pt"  display-align="center" font-weight="bold">
                        with the Export Administration regulations. Diversion contrary to U.S. law is prohibited.
                   </fo:block>
                   </fo:table-cell>
                   </fo:table-row>
            </fo:table-body>
    </fo:table>


    <fo:table width="100%" table-layout="fixed">
        <fo:table-column column-width="20mm" />
        <fo:table-column column-width="60mm" />
        <fo:table-column column-width="6mm" />
        <fo:table-column column-width="10mm" />
        <fo:table-column column-width="24mm" />
        <fo:table-body>
	        <fo:table-row>
                <fo:table-cell display-align="center">
                    <fo:block text-align="center" font-size="7pt" font-weight="bold" >
                        Signature:
                    </fo:block>
                </fo:table-cell>
                <fo:table-cell display-align="center" border-bottom="1pt dashed silver">
		            <fo:block font-size="6pt">
                        <xsl:value-of select="/commercialInvoice/signature"/>
                    </fo:block>
                </fo:table-cell>
                <fo:table-cell display-align="center">
                    <fo:block text-align="center" font-size="7pt" font-weight="bold" >
                    </fo:block>
                </fo:table-cell>
                <fo:table-cell display-align="center">
		            <fo:block text-align="center" font-size="7pt" font-weight="bold" >
		                Date:
	                </fo:block>
	            </fo:table-cell>
                <fo:table-cell display-align="center" border-bottom="1pt dashed silver">
		            <fo:block>
		                <!--<fo:leader leader-pattern="rule" leader-length="1in" rule-thickness="1pt" color="black" />-->
	                </fo:block>
                </fo:table-cell>
            </fo:table-row>
        </fo:table-body>
    </fo:table>

    <!-- Inorder to get page count -->
    <fo:block id="endofdoc"></fo:block>


</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>


<!-- ================================ -->
<!--  Child element: Shipper Address  -->
<!-- ================================ -->


<xsl:template match="shipperAddress">
	<fo:table margin="2mm" width="100%" table-layout="fixed">
		<fo:table-column />
	        <fo:table-body>
			<fo:table-row height="0.5cm">
				<fo:table-cell background-color="#DEE1E2"  display-align="center">
				<fo:block font-weight="bold">Shipper:</fo:block>
				</fo:table-cell>
			</fo:table-row>

			<fo:table-row height="2cm">
				<fo:table-cell font-weight="bold" background-color="#FFFFEE"  >

				<fo:block space-before="2mm" ><xsl:value-of select="name"/></fo:block>
                    <fo:block>
                        <xsl:if test="contactPerson!=''">
                        C/O
                        </xsl:if>
                        <xsl:value-of select="contactPerson"/>
                    </fo:block>
                    <fo:block><xsl:value-of select="address1"/></fo:block>
                    <fo:block><xsl:value-of select="address2"/></fo:block>
                    <fo:block><xsl:value-of select="address3"/></fo:block>
		            <fo:block><xsl:value-of select="address4"/></fo:block>
		            <fo:block><xsl:value-of select="city"/></fo:block>
                    <fo:block><xsl:value-of select="state"/></fo:block>
                    <fo:block><xsl:value-of select="phone"/></fo:block>
                    <fo:block><xsl:value-of select="cellno"/></fo:block>
                    <fo:block><xsl:value-of select="fax"/></fo:block>
                    <fo:block><xsl:value-of select="email"/></fo:block>
		    	</fo:table-cell>
			</fo:table-row>
		</fo:table-body>
	</fo:table>
</xsl:template>

<!-- ================================ -->
<!--  Child element: Bill To Address  -->
<!-- ================================ -->


    <xsl:template match="billToAddress">
        <fo:table margin="2mm" width="100%" table-layout="fixed">
            <fo:table-column />
                <fo:table-body>
                <fo:table-row height="0.5cm">
                    <fo:table-cell background-color="#DEE1E2"  display-align="center">
                    <fo:block font-weight="bold">Bill To :</fo:block>
                    </fo:table-cell>
                </fo:table-row>

                <fo:table-row height="2cm">
                    <fo:table-cell font-weight="bold" background-color="#FFFFEE"   >

                    <!--<fo:block space-before="2mm"><xsl:value-of select="name"/></fo:block>-->
		            <fo:block space-before="2mm"><xsl:value-of select="address1"/></fo:block>
                    <fo:block><xsl:value-of select="contactPerson"/></fo:block>
                    <fo:block><xsl:value-of select="address2"/></fo:block>
                    <fo:block><xsl:value-of select="address3"/></fo:block>
		            <fo:block><xsl:value-of select="address4"/></fo:block>
		            <fo:block><xsl:value-of select="city"/></fo:block>
                    <fo:block><xsl:value-of select="state"/></fo:block>
                    <fo:block><xsl:value-of select="phone"/></fo:block>
                    <fo:block><xsl:value-of select="cellno"/></fo:block>
                    <fo:block><xsl:value-of select="fax"/></fo:block>
                    <fo:block><xsl:value-of select="email"/></fo:block>

                    </fo:table-cell>
                </fo:table-row>

            </fo:table-body>
        </fo:table>
    </xsl:template>


<!-- =================================== -->
<!--	Child element: Ship To Address   -->
<!-- =================================== -->


<xsl:template match="shipToAddress">
	<fo:table margin="2mm" width="100%" table-layout="fixed">
		<fo:table-column />
		<fo:table-body>
			<fo:table-row height="0.5cm">
				<fo:table-cell background-color="#DEE1E2" display-align="center">
				<fo:block font-weight="bold">Ship To :</fo:block>
				</fo:table-cell>
			</fo:table-row>

			<fo:table-row height="2cm">
				<fo:table-cell font-weight="bold" background-color="#FFFFEE" >

				<!--<fo:block space-before="2mm" ><xsl:value-of select="name"/></fo:block>-->
                    <fo:block space-before="2mm"><xsl:value-of select="address1"/></fo:block>
    				<fo:block><xsl:value-of select="contactPerson"/></fo:block>
                    <fo:block><xsl:value-of select="address2"/></fo:block>
                    <fo:block><xsl:value-of select="address3"/></fo:block>
		            <fo:block><xsl:value-of select="address4"/></fo:block>
		            <fo:block><xsl:value-of select="city"/></fo:block>
                    <fo:block><xsl:value-of select="state"/></fo:block>
                    <fo:block><xsl:value-of select="phone"/></fo:block>
                    <fo:block><xsl:value-of select="cellno"/></fo:block>
                    <fo:block><xsl:value-of select="fax"/></fo:block>
                    <fo:block><xsl:value-of select="email"/></fo:block>
				</fo:table-cell>
			</fo:table-row>
		</fo:table-body>
	</fo:table>
</xsl:template>


<!-- =================================== -->
<!--	child element: LineItems	   -->
<!-- =================================== -->

<xsl:template match="lineItems">
	<fo:block font-size="7pt">
        <fo:table width="100%" table-layout="fixed">
		<fo:table-column column-width="10mm"/>
		<fo:table-column />
		<fo:table-column />
		<fo:table-column />
		<fo:table-column column-width="10mm"/>
		<fo:table-column />
		<fo:table-column />
		<fo:table-column column-width="18mm"/>
		<fo:table-column column-width="13mm"/>
		<fo:table-column column-width="15mm"/>
		<fo:table-column column-width="15mm"/>
		<fo:table-column column-width="15mm"/>
        <fo:table-body>
		<fo:table-row height="0.6cm" background-color="#DEE1E2">
			<fo:table-cell border="1pt double black" display-align="center" >
				<fo:block font-weight="bold" text-align="center">PO Line No</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="mktPartTitle"/>
				</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">Customer Part Number</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">Product Description</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">Units</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="scheduleTitle"/>
				</fo:block>
	  		</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="scheduleNoDes"/>
				</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="eccnTitle"/>
				</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="licenseExceptionTitle"/>
				</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
		    		<fo:block font-weight="bold" text-align="center">Shipped Qty</fo:block>
	  		</fo:table-cell>
	  		<fo:table-cell border="1pt double black" display-align="center" >
				<fo:block font-weight="bold" text-align="center">Unit Price </fo:block>
                <fo:block font-weight="bold" text-align="center">(USD) </fo:block>
            </fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center" >
				<fo:block font-weight="bold" text-align="center">Line Total</fo:block>
			</fo:table-cell>
		</fo:table-row>
		<xsl:for-each select="/commercialInvoice/lineItems/lineItem">
		<fo:table-row height="0.4cm" background-color="#FFFFEE">
			<fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="poLineNumber"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center" hyphenate="true" language = "en">
				<fo:block font-weight="bold" text-align="left">
					<xsl:value-of select="mktPartNunber"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center" hyphenate="true" language = "en">
				<fo:block font-weight="bold" text-align="left">
					<xsl:value-of select="customerPartNumber"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center" hyphenate="true" language = "en">
				<fo:block font-weight="bold" text-align="left">
					<xsl:value-of select="productDescription"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="uom"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="scheduleNumber"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="scheduleNumberDescription"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="eccn"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="center">
					<xsl:value-of select="licenseException"/>
				</fo:block>
			</fo:table-cell>

	                <fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="right">
					<xsl:value-of select="shippedQty"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="right">
					<xsl:value-of select="unitPrice"/>
				</fo:block>
			</fo:table-cell>
			<fo:table-cell border="1pt double black" display-align="center">
				<fo:block font-weight="bold" text-align="right">
					<xsl:value-of select="lineTotal"/>
				</fo:block>
			</fo:table-cell>
                </fo:table-row>
            </xsl:for-each>
		</fo:table-body>
	</fo:table>
    </fo:block >
</xsl:template>

<!-- =================================== -->
<!--  Freight Tracking element: Tracking -->
<!-- =================================== -->

</xsl:stylesheet>